package com.ruoyi.team.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 出入库单据对象 stock_bill
 *
 * @author ruoyi
 * @date 2022-11-28
 */

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString

@TableName("stock_bill")
public class StockBill extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 单据流水号 */
    @Excel(name = "单据流水号")
    @TableId(type = IdType.AUTO)
    @TableField("id")
    private Long id;

    /** 类型, 0 入库, 1 出库 */
    @Excel(name = "类型, 0 入库, 1 出库")
    @TableField("type")
    private Integer type;

    /** 仓库id */
    @Excel(name = "仓库id")
    @TableField("store_id")
    private Long storeId;

    /** 出入库时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出入库时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("busi_date")
    private Date busiDate;

    /** 0 正常, -1 作废 */
    @Excel(name = "0 正常, -1 作废")
    @TableField("status")
    private Integer status;

    /** 操作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("operate_date")
    private Date operateDate;

    /** 操作人 */
    @Excel(name = "操作人")
    @TableField("operator_id")
    private Long operatorId;

    // 录入人
    @TableField(exist = false)
    private String operatorName;

    // 商品明细信息
    @TableField(exist = false)
    private List<StockBillItem> list;

    // 仓库名称
    @TableField(exist = false)
    private String storeName;

    private String remark;

    // 总数量
    @TableField(exist = false)
    private Integer totalNum;

    // 总金额
    @TableField(exist = false)
    private BigDecimal totalMoney;
}
